package com.BookMate.service;

import com.BookMate.domain.Book;
import com.BookMate.domain.User;
import entity.PageResult;

/**
 * 图书接口
 */
public interface BookService {
    PageResult selectNewBooks(Integer pageNum, Integer pageSize);//查询最新上架的图书
    Book findById(String id);//根据id查询图书信息
    Integer borrowBook(Book book);//借阅图书
    PageResult search(Book book, Integer pageNum, Integer pageSize);//分页查询图书
    Integer addBook(Book book);//新增图书
    Integer editBook(Book book);//编辑图书信息
    PageResult searchBorrowed(Book book, User user, Integer pageNum, Integer pageSize);//查询当前借阅的图书
    boolean returnBook(String id, User user);//归还图书
    Integer returnConfirm(String id);//归还确认

}
